import request from '@/utils/request'

// 获取一体杆列表
const getPoleListAPI = (params) => {
  return request({
    url: 'pole/info/list',
    params
  })
}

// 获取关联区域
const getAssociatedRegion = () => {
  return request({
    url: 'parking/area/dropList'
  })
}

// 新增一体杆
const createPoleAPI = data => {
  return request({
    url: 'pole/info',
    method: 'post',
    data
  })
}

// 修改一体杆
const updataPoleAPI = data => {
  return request({
    url: 'pole/info',
    method: 'put',
    data

  })
}

// 删除一体杆

const delPoleByIds = ids => {
  return request({
    url: `pole/info/${ids}`,
    method: 'delete'
  })
}

export { getPoleListAPI, getAssociatedRegion, createPoleAPI, updataPoleAPI, delPoleByIds }
